<html>
<head><meta charset="utf-8"><title>const fn wishlist · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html">const fn wishlist</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="175853627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175853627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175853627">(Sep 16 2019 at 21:17)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> a crazy request: replace <a href="http://build.rs" target="_blank" title="http://build.rs">build.rs</a> with const fn.</p>



<a name="175853850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175853850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175853850">(Sep 16 2019 at 21:21)</a>:</h4>
<p>/me thinks… we would need to reimplement gcc in const-fn-rust.</p>



<a name="175853926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175853926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175853926">(Sep 16 2019 at 21:22)</a>:</h4>
<p>have fun implementing gcc without using conditionals :D</p>



<a name="175853972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175853972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175853972">(Sep 16 2019 at 21:22)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> well the context is <a href="https://www.youtube.com/watch?v=wkXNm_qo8aY" target="_blank" title="https://www.youtube.com/watch?v=wkXNm_qo8aY">https://www.youtube.com/watch?v=wkXNm_qo8aY</a> which I watched mostly because I like oli’s way of saying things.</p>
<div class="youtube-video message_inline_image"><a data-id="wkXNm_qo8aY" href="https://www.youtube.com/watch?v=wkXNm_qo8aY" target="_blank" title="https://www.youtube.com/watch?v=wkXNm_qo8aY"><img src="https://i.ytimg.com/vi/wkXNm_qo8aY/default.jpg"></a></div>



<a name="175853998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175853998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175853998">(Sep 16 2019 at 21:23)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> also inline assembly replaced by a const fn would be dope :D</p>



<a name="175854111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175854111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175854111">(Sep 16 2019 at 21:24)</a>:</h4>
<p>I just searched for RustConf 2019 talks earlier today and couldnt find any... odd^^</p>



<a name="175854120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175854120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175854120">(Sep 16 2019 at 21:24)</a>:</h4>
<p>Specifically Oli said y'all are working on it and was looking for things that we want to work.</p>



<a name="175854130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175854130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175854130">(Sep 16 2019 at 21:24)</a>:</h4>
<p>ah, published today. well then.^^</p>



<a name="175854135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175854135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> QuietMisdreavus <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175854135">(Sep 16 2019 at 21:24)</a>:</h4>
<p>the talk recordings were only posted today, lol</p>



<a name="175855490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175855490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175855490">(Sep 16 2019 at 21:42)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span>  throw up an issue in <a href="https://github.com/rust-lang/rust/issues/57563" target="_blank" title="https://github.com/rust-lang/rust/issues/57563">https://github.com/rust-lang/rust/issues/57563</a> or something</p>



<a name="175868054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175868054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175868054">(Sep 17 2019 at 01:19)</a>:</h4>
<blockquote>
<p>gcc without using conditionals</p>
</blockquote>
<p>This is the True Deterministic Build</p>



<a name="175890900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175890900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175890900">(Sep 17 2019 at 09:49)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> cool talk</p>



<a name="175891011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175891011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175891011">(Sep 17 2019 at 09:51)</a>:</h4>
<p>thx</p>



<a name="175891024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175891024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175891024">(Sep 17 2019 at 09:51)</a>:</h4>
<p>it was a lot of fun to hold</p>



<a name="175891214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175891214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175891214">(Sep 17 2019 at 09:54)</a>:</h4>
<p>Just watched it last night. Compile time serde is a really neat idea!</p>



<a name="175894738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175894738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175894738">(Sep 17 2019 at 10:55)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> I have a small prototype of packed_simd that uses the new <code>repr(simd) [T; N]</code>, but needs to use <code>-Zunleash-the-miri-inside-of-you</code> :/</p>



<a name="175894821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175894821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175894821">(Sep 17 2019 at 10:57)</a>:</h4>
<p>the feature is quite fun to play with</p>



<a name="175898500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898500">(Sep 17 2019 at 11:57)</a>:</h4>
<p><span class="user-mention" data-user-id="132920">@gnzlbg</span> what's the blocker for you? loops or conditionals?</p>



<a name="175898518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898518">(Sep 17 2019 at 11:57)</a>:</h4>
<p>generics</p>



<a name="175898590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898590">(Sep 17 2019 at 11:58)</a>:</h4>
<p>I want to be able to write:</p>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nc">SomeTrait</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">N</span>:<span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">[</span><span class="n">T</span><span class="p">;</span><span class="w"> </span><span class="n">N</span><span class="p">]</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">const</span><span class="w"> </span><span class="k">fn</span> <span class="nf">splat</span><span class="p">(</span><span class="n">x</span>: <span class="nc">SomeTrait</span>::<span class="n">Input</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="p">[</span><span class="n">x</span><span class="p">.</span><span class="n">map</span><span class="p">();</span><span class="w"> </span><span class="n">N</span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="175898591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898591">(Sep 17 2019 at 11:58)</a>:</h4>
<p>that just needs <code>#![feature(const_fn)]</code></p>



<a name="175898611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898611">(Sep 17 2019 at 11:59)</a>:</h4>
<p>oh</p>



<a name="175898613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898613">(Sep 17 2019 at 11:59)</a>:</h4>
<p>wait that works!?!?</p>



<a name="175898616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898616">(Sep 17 2019 at 11:59)</a>:</h4>
<p>No it doesn't</p>



<a name="175898629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898629">(Sep 17 2019 at 11:59)</a>:</h4>
<p>That's commented out for me right now</p>



<a name="175898631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898631">(Sep 17 2019 at 11:59)</a>:</h4>
<p>"works" with <code>-Zunleash-the-miri-inside-of-you</code>?</p>



<a name="175898634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898634">(Sep 17 2019 at 11:59)</a>:</h4>
<p>it shouldn't</p>



<a name="175898721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898721">(Sep 17 2019 at 12:00)</a>:</h4>
<p>you need <a href="https://github.com/rust-lang/rfcs/pull/2632" target="_blank" title="https://github.com/rust-lang/rfcs/pull/2632">https://github.com/rust-lang/rfcs/pull/2632</a> for that</p>



<a name="175898728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898728">(Sep 17 2019 at 12:00)</a>:</h4>
<p>I tried using an associated <code>const MAP: fn(Self::Input) -&gt; Self</code></p>



<a name="175898732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898732">(Sep 17 2019 at 12:00)</a>:</h4>
<p>that won't work either <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="175898734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898734">(Sep 17 2019 at 12:00)</a>:</h4>
<p>to do pointer dispatch</p>



<a name="175898742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898742">(Sep 17 2019 at 12:00)</a>:</h4>
<p>but it did not work</p>



<a name="175898745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898745">(Sep 17 2019 at 12:00)</a>:</h4>
<p>yeah</p>



<a name="175898749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898749">(Sep 17 2019 at 12:00)</a>:</h4>
<p>wait... that may work</p>



<a name="175898757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898757">(Sep 17 2019 at 12:01)</a>:</h4>
<p>it did not work for me</p>



<a name="175898759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898759">(Sep 17 2019 at 12:01)</a>:</h4>
<p>is the function you turn into a function pointer a <code>const fn</code>?</p>



<a name="175898773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898773">(Sep 17 2019 at 12:01)</a>:</h4>
<p>yes, but I couldn't specify it in the trait as <code>const MAP: const fn(...)</code></p>



<a name="175898782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898782">(Sep 17 2019 at 12:01)</a>:</h4>
<p>that's irrelevant I thought</p>



<a name="175898784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898784">(Sep 17 2019 at 12:01)</a>:</h4>
<p>what's the error you're getting</p>



<a name="175898796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898796">(Sep 17 2019 at 12:01)</a>:</h4>
<p>let me uncomment that and try</p>



<a name="175898818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898818">(Sep 17 2019 at 12:01)</a>:</h4>
<p>let's move this to another stream, and I have a pizza in the oven</p>



<a name="175898825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175898825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175898825">(Sep 17 2019 at 12:02)</a>:</h4>
<p>as long as the function is defined as <code>const fn</code>, <code>-Zunleash-the-miri-inside-of-you</code> should work</p>



<a name="175899338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175899338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175899338">(Sep 17 2019 at 12:10)</a>:</h4>
<p>yea, function pointers work: <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=f80d7c63f2cf2b91106a91860e80d219" target="_blank" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=f80d7c63f2cf2b91106a91860e80d219">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=f80d7c63f2cf2b91106a91860e80d219</a></p>



<a name="175899346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175899346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175899346">(Sep 17 2019 at 12:10)</a>:</h4>
<p>I love that I can test this on stable :D</p>



<a name="175985875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175985875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175985875">(Sep 18 2019 at 09:19)</a>:</h4>
<blockquote>
<p>I love that I can test this on stable :D</p>
</blockquote>
<p>that's the <code>fib</code> thing from your talk, right? Isn't it a bug that we even attempt to compute this?^^</p>



<a name="175987311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175987311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175987311">(Sep 18 2019 at 09:36)</a>:</h4>
<p>don't mess with my pretties</p>



<a name="175987338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175987338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175987338">(Sep 18 2019 at 09:37)</a>:</h4>
<p>but yes it's a bug</p>



<a name="175987373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/175987373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#175987373">(Sep 18 2019 at 09:37)</a>:</h4>
<p>though I'm not sure how fixable... something something typeck queries</p>



<a name="176303208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176303208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176303208">(Sep 22 2019 at 09:40)</a>:</h4>
<p>more to the wishlist, I needed a <code>is_const_eval</code> intrinsic for packed_simd</p>



<a name="176304635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176304635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176304635">(Sep 22 2019 at 10:25)</a>:</h4>
<p>depending on the target we might want to dispatch to a dynamically-linked libmvec, and each libmvec has different symbol / function names</p>



<a name="176304641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176304641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176304641">(Sep 22 2019 at 10:25)</a>:</h4>
<p>as well as precision, etc.</p>



<a name="176304690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176304690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176304690">(Sep 22 2019 at 10:26)</a>:</h4>
<p>we also have lots of workarounds for llvm codegen bugs, that call different llvm.intrinsics instead of portable rustc intrinsics</p>



<a name="176304693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176304693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176304693">(Sep 22 2019 at 10:26)</a>:</h4>
<p>on the different architectures</p>



<a name="176304696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176304696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176304696">(Sep 22 2019 at 10:26)</a>:</h4>
<p>in constant evaluation none of that makes sense doing</p>



<a name="176324339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176324339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176324339">(Sep 22 2019 at 20:07)</a>:</h4>
<p>i want const SIMD filling</p>



<a name="176324345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176324345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176324345">(Sep 22 2019 at 20:07)</a>:</h4>
<p>I don't need the evaluation const, but i want to be able to declare PIx4 as a 128 bit const for example</p>



<a name="176342624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176342624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176342624">(Sep 23 2019 at 06:06)</a>:</h4>
<p>You can already do that</p>



<a name="176529824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176529824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176529824">(Sep 25 2019 at 03:11)</a>:</h4>
<p>example code?</p>



<a name="176537346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176537346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176537346">(Sep 25 2019 at 06:31)</a>:</h4>
<p>You can use an union</p>



<a name="176568589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176568589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176568589">(Sep 25 2019 at 14:15)</a>:</h4>
<p><span class="user-mention" data-user-id="224471">@Lokathor</span> this works on stable: <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=2743cb6a0f85f4992975eab5bffedc64" target="_blank" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=2743cb6a0f85f4992975eab5bffedc64">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=2743cb6a0f85f4992975eab5bffedc64</a></p>



<a name="176580961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176580961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176580961">(Sep 25 2019 at 16:17)</a>:</h4>
<p>That's extremely sub-optimal</p>



<a name="176580994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176580994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176580994">(Sep 25 2019 at 16:17)</a>:</h4>
<p>I agree that it works, but it's not fit for using in  a lib that you want end users to use</p>



<a name="176581861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176581861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176581861">(Sep 25 2019 at 16:27)</a>:</h4>
<p>you can write a macro that does that</p>



<a name="176582187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176582187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176582187">(Sep 25 2019 at 16:30)</a>:</h4>
<p>does your lib return <code>core::arch</code> types and does it require your users to put those in <code>const</code>s ?</p>



<a name="176582930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176582930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176582930">(Sep 25 2019 at 16:39)</a>:</h4>
<p>I'd like to have <code>pub const Name: Newtype Wrapper = (whatever);</code></p>



<a name="176582994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176582994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176582994">(Sep 25 2019 at 16:40)</a>:</h4>
<p>i guess it works out, i can just put the newtype into the union too</p>



<a name="176589223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176589223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176589223">(Sep 25 2019 at 17:48)</a>:</h4>
<p>what's "whatever" ?</p>



<a name="176589237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176589237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176589237">(Sep 25 2019 at 17:48)</a>:</h4>
<p>(is kind of important)</p>



<a name="176591752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176591752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176591752">(Sep 25 2019 at 18:14)</a>:</h4>
<p>If you want something like <code>NewtypeWrapper::new(...)</code> in the rhs, then I don't think there is a way to do that</p>



<a name="176591767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176591767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176591767">(Sep 25 2019 at 18:14)</a>:</h4>
<p>on stable at least</p>



<a name="176591777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176591777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176591777">(Sep 25 2019 at 18:14)</a>:</h4>
<p>on nightly it is easy if you enable unions in const fn</p>



<a name="176591799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176591799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176591799">(Sep 25 2019 at 18:14)</a>:</h4>
<p>on stable the only workaround is a macro</p>



<a name="176608695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/176608695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#176608695">(Sep 25 2019 at 21:53)</a>:</h4>
<p>yeah it's a <code>new</code> method call, but using unions that call can be made const</p>



<a name="177304806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/177304806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#177304806">(Oct 04 2019 at 02:03)</a>:</h4>
<p>oh wait, it can't be a const fn with the union trick, i see now what you mean.</p>
<p>drat.</p>



<a name="180688265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/180688265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#180688265">(Nov 14 2019 at 00:25)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <code>const fn OsStr::new</code>!</p>



<a name="180725211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/180725211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#180725211">(Nov 14 2019 at 12:23)</a>:</h4>
<p>That requires <a href="https://github.com/rust-lang/rfcs/pull/2632" target="_blank" title="https://github.com/rust-lang/rfcs/pull/2632">https://github.com/rust-lang/rfcs/pull/2632</a> because <code>OsStr::new</code> has trait bounds</p>



<a name="180803435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/180803435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#180803435">(Nov 15 2019 at 05:15)</a>:</h4>
<p><code>core::mem::zeroed</code>, did we say that one yet?</p>
<p>I hope you're keeping track of all these in an issue or something oli ;3</p>



<a name="180876141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/180876141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#180876141">(Nov 15 2019 at 21:55)</a>:</h4>
<blockquote>
<p>Thinking of other deprecated functions, will <code>thread::sleep</code> be const? :-)</p>
<p>nah, it won't do a thing</p>
</blockquote>
<p><span class="user-mention" data-user-id="124288">@oli</span> why wouldn't it? Or do you just mean you'd deliberately make it so that it was a no-op?</p>



<a name="180876449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/180876449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#180876449">(Nov 15 2019 at 21:59)</a>:</h4>
<p>I expect defining 'time' as a thing in const fn is awkward</p>



<a name="180878884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/180878884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#180878884">(Nov 15 2019 at 22:33)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> building a model of concurrency compatible with deterministic execution is going to be a fun project <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="180904795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/180904795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#180904795">(Nov 16 2019 at 09:23)</a>:</h4>
<blockquote>
<p><code>core::mem::zeroed</code>, did we say that one yet?</p>
<p>I hope you're keeping track of all these in an issue or something oli ;3</p>
</blockquote>
<p>we have an issue or at least discussions specifically about <code>zeroed</code> somewhere</p>



<a name="180904827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/180904827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#180904827">(Nov 16 2019 at 09:24)</a>:</h4>
<p>doing this "right" is blocked on <code>&amp;mut</code>-in-const</p>



<a name="181210924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181210924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181210924">(Nov 20 2019 at 14:22)</a>:</h4>
<p>Is Vec::push possible at the moment?</p>



<a name="181210961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181210961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181210961">(Nov 20 2019 at 14:22)</a>:</h4>
<p>I believe no -- we need memory allocation</p>



<a name="181210970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181210970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181210970">(Nov 20 2019 at 14:22)</a>:</h4>
<p>ArrayVec::push might be though</p>



<a name="181210983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181210983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181210983">(Nov 20 2019 at 14:23)</a>:</h4>
<p>(modulo lack of <code>&amp;mut</code>)</p>



<a name="181211011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181211011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181211011">(Nov 20 2019 at 14:23)</a>:</h4>
<p>In theory, <em>could</em> we support Vec::push?</p>



<a name="181211030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181211030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181211030">(Nov 20 2019 at 14:23)</a>:</h4>
<p>For that matter, would filling in a constant hash table be possible?</p>



<a name="181211598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181211598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181211598">(Nov 20 2019 at 14:28)</a>:</h4>
<p>I believe both are definitely possible (or so I understood in discussions with Centril)</p>



<a name="181211908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181211908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181211908">(Nov 20 2019 at 14:31)</a>:</h4>
<p>See discussions in <a href="#narrow/stream/146212-t-compiler.2Fconst-eval" title="#narrow/stream/146212-t-compiler.2Fconst-eval">https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval</a> and <a href="https://github.com/rust-lang/const-eval/issues/20" target="_blank" title="https://github.com/rust-lang/const-eval/issues/20">https://github.com/rust-lang/const-eval/issues/20</a></p>



<a name="181211984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181211984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181211984">(Nov 20 2019 at 14:32)</a>:</h4>
<p>it's a mess... <span aria-label="frown" class="emoji emoji-1f641" role="img" title="frown">:frown:</span></p>



<a name="181216098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181216098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181216098">(Nov 20 2019 at 15:15)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span>’s talk linked at the beginning in this thread outlines a possible path forward for const-fn-izing functions that would otherwise require heap</p>



<a name="181217017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181217017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181217017">(Nov 20 2019 at 15:21)</a>:</h4>
<p>a lot happened since that talk ;) it wasn't that easy</p>



<a name="181218089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181218089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181218089">(Nov 20 2019 at 15:33)</a>:</h4>
<p>for monomorphic constants it's still that easy</p>



<a name="181218115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181218115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181218115">(Nov 20 2019 at 15:33)</a>:</h4>
<p>for anything else we can require users to use a special allocator</p>



<a name="181219305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/const%20fn%20wishlist/near/181219305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/const.20fn.20wishlist.html#181219305">(Nov 20 2019 at 15:45)</a>:</h4>
<p>well the whole <code>const(heap) fn</code> stuff...</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>